﻿namespace Crypton
{
    /// <summary>
    /// Service factory
    /// </summary>
    public static class ServiceFactory
    {
        /// <summary>
        /// Creates the crypton service.
        /// </summary>
        /// <param name="logger">The logger.</param>
        /// <returns></returns>
        public static ICryptonService CreateCryptonService(ILogger logger = null)
        {
            return new CryptonService(logger ?? CreateConsoleLogger());
        }

        /// <summary>
        /// Creates the console logger service.
        /// </summary>
        /// <returns></returns>
        public static ILogger CreateConsoleLogger()
        {
            return new ConsoleLogger();
        }
    }
}
